package com.team.lostProperty.mapper;

import com.team.lostProperty.entity.Comments;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author duzq
 * @date 2020/7/22 19:02
 */

@Repository
public interface CommentsDao {

    //获取评论总条数
    int getAllCount(@Param("status") int status);

    //获取评论
    List<Comments> getComments(@Param("status") int status, @Param("page") int page, @Param("limit") int limit);

    //根据条件查询评论
    List<Comments> selectComments(Comments comments);

    //根据id删除评论
    int deleteComments(int id);

    //根据id修改审核状态
    int updateComments(int status, long commentsId);

    //根据id修改审核状态
    List<Comments> selectByPushInfoId(Long pushInfoId);

    // 根据实体添加一条数据
    void insertComment(Comments comments);
}
